package com.xyazm.coupon.entity;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xyazm.common.domain.BaseDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 优惠券资源
 * </p>
 *
 * @author xuyou
 * @since 2022-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "CouponResource对象", description = "优惠券资源")
@TableName("coupon_resource")
public class CouponResourceDO extends BaseDO implements Serializable {


    @ApiModelProperty(value = "优惠券资源id")
    @TableField("coupon_resource_id")
    private Long couponResourceId;

    @ApiModelProperty(value = "优惠券名称")
    @TableField("`name`")
    private String name;

    @ApiModelProperty(value = "优惠券类型，1：现金券，2：满减券")
    @TableField("`type`")
    private Integer type;

    @ApiModelProperty(value = "优惠券抵扣金额")
    private Integer amount;

    @ApiModelProperty(value = "订单满多少金额才可以使用")
    @TableField("condition_amount")
    private Integer conditionAmount;

    @ApiModelProperty(value = "有效期开始时间")
    @TableField("valid_start_time")
    private Date validStartTime;

    @ApiModelProperty(value = "有效期结束时间")
    @TableField("valid_end_time")
    private Date validEndTime;

    @ApiModelProperty(value = "优惠券发行数量")
    @TableField("give_out_count")
    private Long giveOutCount;

    @ApiModelProperty(value = "优惠券已经领取的数量")
    @TableField("received_count")
    private Long receivedCount;

    @ApiModelProperty(value = "优惠券发放方式，1：可发放可领取，2：仅可发放，3：仅可领取")
    @TableField("give_out_type")
    private Integer giveOutType;

    @ApiModelProperty(value = "优惠券状态，1：未开始；2：发放中，3：已发完；4：已过期")
    @TableField("status")
    private Integer status;


}
